<?php
/**
 * @Author: liuhongbin
 * @Email: 514660094@qq.com
 * @Date: 2019-02-12 16:15:10
 * @Description:
 * @LastEditors: liuhongbin
 * @LastEditTime: xxx
 */

namespace hiduoke\services\facade;

use EasyWeChat\Kernel\Support\Collection;
use EasyWeChat\Payment\Transfer\Client;
use Psr\Http\Message\ResponseInterface;
use think\Facade;
use EasyWeChat\Payment\Application as PayApp;
use EasyWeChat\Payment\Order\Client as OrderClient;
use EasyWeChat\OfficialAccount\Application as WxApp;

/**
 * User: liuhongbin
 * @package hiduoke\services\facade
 * @see \hiduoke\services\WechatService
 * @mixin \hiduoke\services\WechatService
 * ------------微信支付---------
 * @method static array getOrderConfig() 获取支付配置
 * @method static array getTransferConfig() 获取支付配置
 * @method static PayApp getOrderApp($orderConfig = []) 支付handler
 * @method static OrderClient getOrder() Order
 * @method static array getProfitSharing($payConfig = []) 分账
 * @method static PayApp getTransferApp($transferConfig = []) 企付零handler
 * @method static Client getTransfer($transferConfig = []) Transfer
 * @method static array|Collection|object|ResponseInterface|string transfer(string $money, $desc = '', string $openid = '', string $partner_trade_no = '', $check_name = 'NO_CHECK', $re_user_name = '') 企付零
 * @method static array|Collection|object|ResponseInterface|string|\think\Model transferAuto(string $money, $desc = '', string $openid = '', string $partner_trade_no = '', $check_name = 'NO_CHECK', $re_user_name = '') 企付零自动
 * @method static array|string  order(string $money, $body = '', $profit_sharing = "N", string $openid = '', $out_trade_no = '', $attach = '', $trade_type = 'JSAPI') 订单
 * @method static array|false|string orderQuery(string $number, int $type = 0) 订单查询
 * @method static array|Collection|false|object|ResponseInterface|string orderRefund(string $number, string $refundMoney, $refund_desc = '', string $totalMoney = '', string $refundNumber = '', array $config = [], int $type = 0) 订单退款
 * @method static array Receiver($account, $relation_type = "USER", $custom_relation = "", $type = "PERSONAL_OPENID", $name = "") 创建分账接收方
 * @method static array addReceiver($receiver)  添加分账接收方
 * @method static array deleteReceiver($receiver) 删除分账接收方
 * @method static array share($transaction_id, $receivers, $out_order_no = "") 单次分账
 * @method static bool createShareTask($receivers, $transaction_id, $out_order_no = "", $time_out = 10) 创建一个分账任务
 * @method static array|false shareToUser($order_id, $openid, $amount, $desc, $relation_type = "USER") 分账给一个用户
 * @method static array multiShare($transaction_id, $receivers, $out_order_no) 多次分账 需配合多次分账完结
 * @method static array shareFinish($transaction_id, $description = "分账完结", $out_order_no = "") 多次分账完结
 * ------------微信公众平台---------
 * @method static array  getConfig() 获取平台配置
 * @method static WxApp  getApp($config = []) 获取公众号App
 * @method static false|mixed|string getUser($force_oauth = true, $userinfo = true) 获取微信用户信息
 * @method static mixed|string getUserOauth() 获取微信用户信息（自定义授权页）
 * @method static false|mixed getOpenid() 获得用户的openid
 * @method static string getJssdk($debug = false, $jsApiList = []) 获取Jssdk配置项
 * @method static string getShare($share = [], $fun = '') 获取分享配置项
 * @method static string getCallBackUrl() 获取回调地址
 */
class WechatService extends Facade
{
    protected static function getFacadeClass()
    {
        return 'hiduoke\services\WechatService';
    }
}
